<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/2/8
 * Time: 17:29
 */
$date1=date_create("1974-01-28");
$date2=date_create("1980-10-15");
$diff=date_diff($date1,$date2);
var_export($diff);
$aa=$diff->format("%R%a");
$aa=intval($aa);
var_dump($aa);